package com.yima.baseproj.module.sys.role;

import com.baomidou.mybatisplus.annotation.TableName;
import com.yima.baseproj.module.config.BaseEntity;
import com.yima.baseproj.module.sys.role.model.SysRoleAddParamModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@TableName("sys_role")
public class SysRoleEntity extends BaseEntity {

  @ApiModelProperty(value = "角色名称")
  private String name;

  @ApiModelProperty(value = "权限标识")
  private String permission;

  @ApiModelProperty(value = "正常,禁用")
  private String state;

  @ApiModelProperty(value = "排序")
  private Integer sort;

  @ApiModelProperty(value = "备注")
  private String remark;

  public void setData(SysRoleAddParamModel role) {
    this.name = role.getName();
    this.permission = role.getPermission();
    this.sort = role.getSort();
    this.remark = role.getRemark();
  }
}